package com.cc.springboot.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cc.springboot.mapper.UserMapper;
@Service
public class UserService {
	
	@Autowired
	private UserMapper userMapper;
	
	@Transactional
	public int addUser(Integer id,String name){
		 int insertUser = userMapper.insert(id, name);
		 int i = 1 / 0;
		 return insertUser;
	}

}
